tracking bug: https://bugzilla.kernel.org/show_bug.cgi?id=97631#c1

diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 66e374d..3c9d28a 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -708,6 +708,7 @@ static inline bool skb_pfmemalloc(const struct sk_buff *skb)
  */
 static inline struct dst_entry *skb_dst(const struct sk_buff *skb)
 {
+  BUG_ON(NULL == skb);
 	/* If refdst was not refcounted, check we still are in a 
 	 * rcu_read_lock section
 	 */
@@ -757,6 +758,7 @@ static inline bool skb_dst_is_noref(const struct sk_buff *skb)
 
 static inline struct rtable *skb_rtable(const struct sk_buff *skb)
 {
+  BUG_ON(NULL == skb);
 	return (struct rtable *)skb_dst(skb);
 }
 
diff --git a/net/ipv4/netfilter/nf_reject_ipv4.c b/net/ipv4/netfilter/nf_reject_ipv4.c
index 3262e41..6bce563 100644
--- a/net/ipv4/netfilter/nf_reject_ipv4.c
+++ b/net/ipv4/netfilter/nf_reject_ipv4.c
@@ -111,7 +111,13 @@ void nf_send_reset(struct sk_buff *oldskb, int hook)
 	if (!oth)
 		return;
 
-	if (skb_rtable(oldskb)->rt_flags & (RTCF_BROADCAST | RTCF_MULTICAST))
+  BUG_ON(NULL == oldskb);
+  struct rtable * tmp1=skb_rtable(oldskb);
+  if (NULL == tmp1) {
+    printk(KERN_CRIT "avoiding null ptr deref\n");
+    return;
+  }
+	if (tmp1->rt_flags & (RTCF_BROADCAST | RTCF_MULTICAST))
 		return;
 
 	oiph = ip_hdr(oldskb);
